import request from "@/services/request.ts";

/**
 * 项目管理
 */
// 客户管理
export const customerList  = async ()=>{
    return request.get('/customer')
}
// 客户详情
export const customerDetail = async (id:number)=>{
    return request.get(`/customer/${id}`)
}
// 客户创建
export const customerCreate = async (data:object)=>{
    return request.post('/customer',data)
}

export const customerUpdate = async (id:number,data:object)=>{
    return request.put(`/customer/${id}`,data)
}

export const customerDelete = async (id:number)=>{
    return request.del(`/customer/${id}`)
}

/**
 * 项目分类
 */
export const customerCategory = async ()=>{
    return request.get('/customer/category')
}
export const customerCategoryCreate = async (data:object)=>{
    return request.post('/customer/category',data)
}
export const customerCategoryUpdate = async (id:number,data:object)=>{
    return request.put(`/customer/category/${id}`,data)
}
export const customerCategoryDelete = async (id:number)=>{
    return request.del(`/customer/category/${id}`)
}
/**
 * 项目状态
 */
export const customerTag = async ()=>{
    return request.get('/customer/tag')
}
export const customerTagCreate = async (data:object)=>{
    return request.post('/customer/tag',data)
}
export const customerTagUpdate = async (id:number,data:object)=>{
    return request.put(`/customer/tag/${id}`,data)
}
export const customerTagDelete = async (id:number)=>{
    return request.del(`/customer/tag/${id}`)
}